import request from '@/utils/request'

// 身份证识别
export function idCardOcr(data) {
  return request({
    url: '/driver/ocrIdentification',
    method: 'post',
    data: data,
    headers: {
      // 讓瀏覽器自動設置 multipart 邊界
      repeatSubmit: false
    }
  })
}

// 驾驶证识别
export function driverLicenseOcr(data) {
  return request({
    url: '/driver/ocrDriverLicense',
    method: 'post',
    data: data,
    headers: {
      repeatSubmit: false
    }
  })
}

// 行驶证识别
export function vehicleLicenseOcr(data) {
  return request({
    url: '/driver/ocrVehicleLicense',
    method: 'post',
    data: data,
    headers: {
      repeatSubmit: false
    }
  })
}

// 人脸识别
export function faceRecognition(data) {
  return request({
    url: '/system/ocr/face',
    method: 'post',
    data: data
  })
}

// 获取用户信息（通过人脸ID）
export function getUserInfoByFaceId(faceId) {
  return request({
    url: '/system/ocr/face/user',
    method: 'get',
    params: { faceId: faceId }
  })
}

// 人脸注册
export function faceRegister(data) {
  return request({
    url: '/system/ocr/face/register',
    method: 'post',
    data: data
  })
}